package display;

import it.unibo.is.interfaces.IBasicEnvAwt;
import java.awt.Panel;
import java.awt.TextField;

/**
 * @author Stefano&Davide
 * @version 1.0
 */

public class DisplayGui extends Display{

	protected Panel panel;
	protected IBasicEnvAwt env;
	protected TextField tarea;
	
	public DisplayGui(IBasicEnvAwt env){
		super(env);
	}

	@Override
	protected void configure() {	
		tarea=new TextField(getCurValToShow());
		tarea.setFont(new java.awt.Font("Arial",java.awt.Font.BOLD,24));
		panel=new Panel();
		panel.add(tarea);
		env.addPanel(panel);		
	}

	@Override
	protected void showVal(String v) {
		tarea.setText(v);	
	}

	@Override
	public String getCurValToShow() {	
		return tarea.getText();
	}

}
